/*******************************************************************************
 * Copyright (c) 2005, 2014 springside.github.io
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 *******************************************************************************/
package com.otod.entity;

import org.apache.commons.lang3.builder.ToStringBuilder;

import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.math.BigDecimal;
import java.util.List;

//JPA标识
@Entity
@Table(name = "stock")
public class Stock extends IdEntity {

    private String code; // 股票代码
    private String name; // 股票名称
    private String describe;
    private Integer volume; //总量
    private Integer surVolume;
    private BigDecimal price;

    private Quote quote;

    private List<Min> mins;

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDescribe() {
        return describe;
    }

    public void setDescribe(String describe) {
        this.describe = describe;
    }

    public Integer getVolume() {
        return volume;
    }

    public void setVolume(Integer volume) {
        this.volume = volume;
    }

    public Integer getSurVolume() {
        return surVolume;
    }

    public void setSurVolume(Integer surVolume) {
        this.surVolume = surVolume;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    @Transient
    public Quote getQuote() {
        return quote;
    }

    @Transient
    public void setQuote(Quote quote) {
        this.quote = quote;
    }

    @Transient
    public List<Min> getMins() {
        return mins;
    }

    @Transient
    public void setMins(List<Min> mins) {
        this.mins = mins;
    }

    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this);
    }
}
